﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using WorkSummary.Common.Data;

namespace WorkSummary.Common.log
{
    [TableName("T_SysLog")]
    [Description("系统日志")]
    public class MLog
    {
        private string _userAcc;
        private string _opt;
        private string _info;
        private string _level;
        private string _ex;

        [Description("用户名")]
        public string UserAcc
        {
            get { return _userAcc; }
            set { _userAcc = value; }
        }
        [Description("操作时间")]
        public DateTime LogTime
        {
            get { return DateTime.Now; }
        }
        [Description("操作")]
        public string Opt
        {
            get { return _opt; }
            set { _opt = value; }
        }
        [Description("日志信息")]
        public string Info
        {
            get { return _info; }
            set { _info = value; }
        }
        [Description("日志级别")]
        public string Level
        {
            get { return _level; }
            set { _level = value; }
        }
        [Description("线程号")]
        public string ThreadNum
        {
            get { return Thread.CurrentThread.ManagedThreadId.ToString(); }
        }
        [Description("异常信息")]
        public string Ex
        {
            get { return _ex; }
            set { _ex = value; }
        }
    }
}
